package cn.wolfcode.enums;

import lombok.Getter;

@Getter
public enum NoticeLevelEnum {
    EXIGENCE("紧急",0),
    IMPORT("重要",1),
    COMMON("普通",2);

    private Integer value;
    private String name;

    NoticeLevelEnum(String name, Integer value) {
        this.name=name;
        this.value=value;
    }

    public static String findName(Integer value){
        NoticeLevelEnum[] enums = values();
        for (NoticeLevelEnum anEnum : enums) {
            if(anEnum.getValue().equals(value)){
                return anEnum.getName();
            }
        }
        return null;
    }
}
